﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HotShot.Entities;

namespace HotShot.Service.BusinessLogic.MessageProcessors
{
    public class EntityPayloadComparer: IEqualityComparer<StorageEntity>
    {
        public bool Equals(StorageEntity x, StorageEntity y)
        {
            return x.Payload == y.Payload;
        }

        public int GetHashCode(StorageEntity obj)
        {
            return (obj.Payload ?? String.Empty).GetHashCode();
        }
    }
}
